package itheima.Test;

public class Student {
    /*
    * 成员变量:name  age
    * 成员方法:eat() sleep()
    * */
    private String name;
    private int age;

    public void eat(){
        System.out.println(this.name+"在吃东西");
    }
    public void sleep(){
        System.out.println(this.name+"在睡觉");
    }

    public Student() {
    }

    public Student(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

}
